\hypertarget{classec_1_1ExtendableSingleQueue}{\section{ec\-:\-:Extendable\-Single\-Queue$<$ T $>$ Class Template Reference}
\label{classec_1_1ExtendableSingleQueue}\index{ec\-::\-Extendable\-Single\-Queue$<$ T $>$@{ec\-::\-Extendable\-Single\-Queue$<$ T $>$}}
}


可自动扩容的单向队列  




{\ttfamily \#include $<$extendable\-Single\-Queue.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classec_1_1ExtendableSingleQueue_a9764f38bb0919dda8c93903d8e832604}{{\bfseries Extendable\-Single\-Queue} (uint32\-\_\-t capacity)}\label{classec_1_1ExtendableSingleQueue_a9764f38bb0919dda8c93903d8e832604}

\item 
void \hyperlink{classec_1_1ExtendableSingleQueue_af3c78472828763c77124617296fa4bd3}{push} (T value)
\item 
void \hyperlink{classec_1_1ExtendableSingleQueue_a85bf9411c1e2c10b3a6c5ebdecbc1aea}{refresh} ()
\item 
void \hyperlink{classec_1_1ExtendableSingleQueue_a822dad426a52a071f91d33b28ed2a716}{pop} ()
\item 
bool \hyperlink{classec_1_1ExtendableSingleQueue_a1dc01081add861f3f170b69039bf8f00}{empty} ()
\item 
uint32\-\_\-t \hyperlink{classec_1_1ExtendableSingleQueue_a1261070907529db84c74d8db004a9639}{count} ()
\item 
T \& \hyperlink{classec_1_1ExtendableSingleQueue_a82a41ffedde6119696c55f1a1560a023}{front} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$class ec\-::\-Extendable\-Single\-Queue$<$ T $>$}

可自动扩容的单向队列 

一个线程写入，另一线程读取是安全的;

内部维护了一个单循环队列和一个普通队列，当单循环队列队列满了后会启用普通队列保存元素 

\subsection{Member Function Documentation}
\hypertarget{classec_1_1ExtendableSingleQueue_a1261070907529db84c74d8db004a9639}{\index{ec\-::\-Extendable\-Single\-Queue@{ec\-::\-Extendable\-Single\-Queue}!count@{count}}
\index{count@{count}!ec::ExtendableSingleQueue@{ec\-::\-Extendable\-Single\-Queue}}
\subsubsection[{count}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ uint32\-\_\-t {\bf ec\-::\-Extendable\-Single\-Queue}$<$ T $>$\-::count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1ExtendableSingleQueue_a1261070907529db84c74d8db004a9639}
获取元素数量 \hypertarget{classec_1_1ExtendableSingleQueue_a1dc01081add861f3f170b69039bf8f00}{\index{ec\-::\-Extendable\-Single\-Queue@{ec\-::\-Extendable\-Single\-Queue}!empty@{empty}}
\index{empty@{empty}!ec::ExtendableSingleQueue@{ec\-::\-Extendable\-Single\-Queue}}
\subsubsection[{empty}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ bool {\bf ec\-::\-Extendable\-Single\-Queue}$<$ T $>$\-::empty (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1ExtendableSingleQueue_a1dc01081add861f3f170b69039bf8f00}
是否为空 \hypertarget{classec_1_1ExtendableSingleQueue_a82a41ffedde6119696c55f1a1560a023}{\index{ec\-::\-Extendable\-Single\-Queue@{ec\-::\-Extendable\-Single\-Queue}!front@{front}}
\index{front@{front}!ec::ExtendableSingleQueue@{ec\-::\-Extendable\-Single\-Queue}}
\subsubsection[{front}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ T\& {\bf ec\-::\-Extendable\-Single\-Queue}$<$ T $>$\-::front (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1ExtendableSingleQueue_a82a41ffedde6119696c55f1a1560a023}
获取队尾元素 \hypertarget{classec_1_1ExtendableSingleQueue_a822dad426a52a071f91d33b28ed2a716}{\index{ec\-::\-Extendable\-Single\-Queue@{ec\-::\-Extendable\-Single\-Queue}!pop@{pop}}
\index{pop@{pop}!ec::ExtendableSingleQueue@{ec\-::\-Extendable\-Single\-Queue}}
\subsubsection[{pop}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf ec\-::\-Extendable\-Single\-Queue}$<$ T $>$\-::pop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1ExtendableSingleQueue_a822dad426a52a071f91d33b28ed2a716}
移除队头元素 \hypertarget{classec_1_1ExtendableSingleQueue_af3c78472828763c77124617296fa4bd3}{\index{ec\-::\-Extendable\-Single\-Queue@{ec\-::\-Extendable\-Single\-Queue}!push@{push}}
\index{push@{push}!ec::ExtendableSingleQueue@{ec\-::\-Extendable\-Single\-Queue}}
\subsubsection[{push}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf ec\-::\-Extendable\-Single\-Queue}$<$ T $>$\-::push (
\begin{DoxyParamCaption}
\item[{T}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1ExtendableSingleQueue_af3c78472828763c77124617296fa4bd3}
加一个元素到队尾 \hypertarget{classec_1_1ExtendableSingleQueue_a85bf9411c1e2c10b3a6c5ebdecbc1aea}{\index{ec\-::\-Extendable\-Single\-Queue@{ec\-::\-Extendable\-Single\-Queue}!refresh@{refresh}}
\index{refresh@{refresh}!ec::ExtendableSingleQueue@{ec\-::\-Extendable\-Single\-Queue}}
\subsubsection[{refresh}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename T $>$ void {\bf ec\-::\-Extendable\-Single\-Queue}$<$ T $>$\-::refresh (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classec_1_1ExtendableSingleQueue_a85bf9411c1e2c10b3a6c5ebdecbc1aea}
刷新数据 

The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
include/ec/extendable\-Single\-Queue.\-h\end{DoxyCompactItemize}
